<%@ page info="Stream Image Show"
  pageEncoding="UTF-8" contentType="image/jpg"
  autoFlush="true" buffer="16kb" session="false" import="java.io.FileInputStream"
%>
<%
ServletOutputStream sos = response.getOutputStream();
FileInputStream fis = new FileInputStream("C:/training/project/testjava/WebContent/image/image1.jpg");
byte[] buf = new byte[100];
int len = 0;
while ((len = fis.read(buf)) != -1) {
  sos.write(buf, 0, len);
}
sos.flush();
sos.close();
fis.close();
out.clear();
out=pageContext.pushBody();
%>